package it.mauriziulu.android.ehttpexecutors.response;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;

import org.apache.http.HttpResponse;
import org.apache.http.message.BasicHttpResponse;

public class EHttpResponseContainer {
	private ArrayList<String> messages;
	private HttpResponse mResponse;
	private Serializable mParsedResponse;

	public EHttpResponseContainer() {
	}

	public HttpResponse getResponse() {
		return mResponse;
	}

	public void setResponse(HttpResponse mResponse) {
		this.mResponse = mResponse;
	}

	public Serializable getParsedResponse() {
		return mParsedResponse;
	}

	public void setParsedResponse(Serializable mParsedResponse) {
		this.mParsedResponse = mParsedResponse;
	}

	public void addMessage(String text) {
		if (messages == null) {
			messages = new ArrayList<String>();
		}
		messages.add(text);
	}

	public Iterator<String> getMessageIterator() {
		if (messages != null) {
			return messages.iterator();
		}
		return null;
	}
}
